import { ApiProperty } from '@nestjs/swagger';
import { Type } from 'class-transformer';
import { IsDate } from 'class-validator';

export class TimeRangeReqDto {
  @ApiProperty({ description: '开始时间' })
  @IsDate({ message: '开始时间格式不正确' })
  @Type(() => Date)
  readonly start_time: Date;

  @ApiProperty({ description: '结束时间' })
  @IsDate({ message: '结束时间格式不正确' })
  @Type(() => Date)
  readonly end_time: Date;
}
